package com.h6.crm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.h6.crm.entity.Attachment;
import com.h6.crm.util.pojo.vo.UploadFileVO;

import jakarta.servlet.http.HttpServletResponse;

public interface AttachmentService extends IService<Attachment> {

    /**
     * 处理附件
     * 
     *
     */
    void dealFile(Long fileId, Long entityId, Integer fileType, String remark) throws Exception;

    /**
     * 处理附件
     * 使用H6平台接口
     * 
     *
     */
    void dealFile(String filePath, Long entityId, Integer fileType, String remark) throws Exception;

    /**
     * 查询
     * 
     *
     */
    Attachment getAttachment(Long entityId, Integer fileType);

    /**
     * 查询
     * 
     *
     */
    String getAttachmentUrl(Long entityId, Integer fileType);

    /**
     * 下载
     * TODO Nginx转发下载
     *
     */
    void downloadAttachment(HttpServletResponse response, Long fileId);

    /**
     * 下载
     * TODO Nginx转发下载
     *
     */
    Attachment uploadAttachment(UploadFileVO fileVO);

}
